<%-- 
    Document   : referenceCodes
    Created on : Dec 23, 2010, 10:24:32 PM
    Author     : navneet
--%>

<%@page import="com.myapp.global.user_listclass"%>
<%@page import="java.sql.ResultSet"%>


<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%
    user_listclass ulc = new user_listclass();
%>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Web-Dev-Tool by Navneet Kumar</title>
        <meta http-equiv="Content-Language" content="English" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" type="text/css" href="css/style.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="css/style1.css" media="screen" />
        <script type="text/javascript" src="js/javascript4.js" ></script>
        <script type="text/javascript" src="js/javascript_front2.js" ></script>
        <script type="text/javascript">
            var refForm     = 1;
            var page        = 1;
            var sortby      = 1;
            var sortas      = 1;
            var search      = 0;
            var searchfor   = 0;
            document.onloaded = getformview();
            document.onloaded = getoverview();

            function getoverview(){
                var params = '';
                params += '&refForm='+refForm;
                params += '&page='+page;
                params += '&sortby='+sortby;
                params += '&sortas='+sortas;
                params += '&search='+search;
                params += '&searchfor='+searchfor;
                getaddon("ajax/common.jsp?","doOn=referenceCodes&doThis=1"+params,"tabs","getoverview_cbk");
            }
            function getformview(){
                getaddon("ajax/common.jsp?","doOn=referenceCodeForm&doThis="+refForm,"refForm_id","getoverview_cbk");
            }
            function getdomains_combo(value){
                getaddon("ajax/common.jsp?","doOn=referenceCodes&doThis=2&group="+value,"domains_combo_div","getoverview_cbk");
            }
            function getreference_combo(gvalue,value){
                getaddon("ajax/common.jsp?","doOn=referenceCodes&doThis=3&group="+gvalue+"&domain="+value,"reference_combo_div","getoverview_cbk");
            }
            function getoverview_cbk()
            {
                //getObject("neetProcessingDivtabsData").style.display = 'none';
            }
            function doSave(thisForm){
                getaddon("ajax/common.jsp?","doOn=referenceCodes&doThis=4&refForm="+refForm+"&"+wrapformdata(thisForm),"refFormDiv_result" , "getoverview" );
            }
        </script>
    </head>
    <body>
        <div id="wrap">
            <jsp:include page="/WEB-INF/jspf/header.jspf" flush="true" ></jsp:include>
            <div id="right">
                <%
                    if(session.getAttribute("currentUser") != null && session.getAttribute("currentUser").equals("admin"))
                    {
                        
               %>
                        <table>
                            <thead>
                                <tr>
                                    <th onclick="refForm = 1; getformview(); getoverview();" style="cursor: pointer;">Add Group</th>
                                    <th>&nbsp;</th>
                                    <th onclick="refForm = 2; getformview(); getoverview();" style="cursor: pointer;">Add Domain</th>
                                    <th>&nbsp;</th>
                                    <th onclick="refForm = 3; getformview(); getoverview();" style="cursor: pointer;">Add Reference</th>
                                    <th>&nbsp;</th>
                                    <th onclick="refForm = 4; getformview(); getoverview();" style="cursor: pointer;">Add Elements</th>
                                    <th>&nbsp;</th>
                                </tr>
                                <tr>
                                    <td colspan="8">
                                        <div id="refForm_id">
                                            <div id="neetProcessingDivtabsForm" style='position:relative;'>
                                                <div style='position:absolute; top:0%; left:50%;'>
                                                    <img alt=""  src='Image/icon_processing.gif' />
                                                </div>
                                            </div>
                                        </div>
                                        <div id="refFormDiv_result"></div>
                                    </td>
                                </tr>
                            </thead>
                        </table>
                        <br/>
                        <div id="tabs">
                            <div id="neetProcessingDivtabsData" style='position:relative;'>
                                <div style='position:absolute; top:0%; left:50%;'>
                                    <img alt=""  src='Image/icon_processing.gif' />
                                </div>
                            </div>
                        </div>
                <%
                }
                else
                {
                %>
                    <jsp:include page="login.jsp" flush="true" ></jsp:include>
                <%
                }
                %>
            </div>
            <div id="left">
                <%
                //if(session.getAttribute("currentUser") != null){
                %>
                    <jsp:include page="/WEB-INF/jspf/left_menu.jspf" flush="true" ></jsp:include>
                <%
                //}
                %>
            </div>
            <div style="clear: both;"> </div>
            <jsp:include page="/WEB-INF/jspf/footer.jspf" flush="true" ></jsp:include>
        </div>
    </body>
</html>